<?php
namespace app\ausagent\validate;
use think\Validate;
class Wechatpay extends Validate
{
	//微信支付自动验证
	protected $rule=[
        'mchid'=>'unique:wechatpay|require',
        'mchkey'=>'require',
        'sslcert_path'=>'require',
        'sslkey_path'=>'require',
    ];


    protected $message=[
        'mchid.require'=>'商户号不得为空！',
        'mchid.unique'=>'商户号不得重复！',
        'mchkey.require'=>'商户key不得为空！',
        'sslcert_path.require'=>'sslcert密钥文件必须得上传！',
        'sslkey_path.require'=>'sslkey密钥文件必须得上传！',
    ];

    protected $scene=[
        'add'=>['mchid','mchkey','sslcert_path','sslkey_path'],
        'edit'=>['mchid','mchkey'],
    ];
}